package com.example.springboot.oauth2.controller;

import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/hello")
public class HelloWorldController {


    @RequestMapping(method = RequestMethod.GET)
    public String sayHello() {
        BCryptPasswordEncoder encoder = new BCryptPasswordEncoder();
        String  pwd1 = encoder.encode("admin");
        String  pwd2 = encoder.encode("user");
        String  pwd3 = encoder.encode("123456");
        String  pwd4 = encoder.encode("123456");

        return "Hello User!"+"<br>pwd1="+pwd1+"<br>pwd2="+pwd2+"<br>pwd3="+pwd3+"<br>pwd4="+pwd4;
    }

}
